package com.itheima.duotai;

public class Test {
    public static void main(String[] args) {
  /*      Fu fu = new Fu();
        fu.sing();

        Zi zi = new Zi();
        zi.sing();
*/
        //父类引用指向子类的对象
        Fu fu= new Zi();
        fu.sing();
        System.out.println(fu.i);

        long  l=10;
        //等号 左边 接口   右边  实现类的对象
        Inter inter= new InterImpl();
    }


}


class  Fu{
    int i=10;
    void  sing(){
        System.out.println("大碗宽面");
    }
}
class Zi extends Fu{
    int i=20;
    @Override
    void sing() {
        System.out.println(
                "只因你太美"
        );
    }
}

interface  Inter{
    void sing();
}

class InterImpl implements Inter{

    @Override
    public void sing() {

    }
}